# -*-codeing = utf-8 -*-
# @Tine:2024/9/19 
# @Author:计科201121尚益帆
# File：1.1.py
# @Software:PyCharm
from cgi import print_form

'''
#增
tup1= (1, 2, 3)
tup2=("abc","def")
tup=tup1+tup2
print(tup)
#删
tup1=(12,34,56)
print(tup1)
del tup1
print("删除后:")
print(tup1)'''


dic1={"name":"小明","age":20}
#字典的访问
print(dic1["name"])
#访问了不存在的键
print(dic1["gender"])
#没找到可以设置默认值
print(dic1["gender","m"])

#直接访问，使用get方法没有找到对应的键，返回none
print(dic1.get("gender"))
print(dic1.get("age",18))
print(dic1.get("height",170))